Skip to content

Restore propagation when handing pyprep's logging output back - #219

Merged
sappelhoff merged 1 commit into
mainfrom
doc-logging-hand-back
Nov 3, 2026
Merged

sappelhoff merged 1 commit into
mainfrom
doc-logging-hand-back

Conversation

@sappelhoff

Copy link
Copy Markdown
Owner

PR Description

The Notes of pyprep.setup_logging said to hand the output back by clearing the handlers of the pyprep logger. setup_logging sets propagate = False, and that stayed in place, so the application's handlers never received pyprep's records again: "INFO" was dropped and warnings fell back to logging.lastResort. The Notes now also set propagate = True, and mention that clearing removes any handler the application attached to the pyprep logger.

Tested locally: with the old recipe an application's root handler receives nothing; with the new one it receives "INFO" and warnings again. tests/test_logging.py passes and the docstring renders through numpydoc without warnings.

Merge Checklist

  • the PR has been reviewed and all comments are resolved
  • all CI checks pass
  • (if applicable): the PR description includes the phrase closes #<issue-number> to automatically close an issue
  • (if applicable): the changes are documented in the changelog changelog.rst
  • (if applicable): new contributors have added themselves to the authors list in the CITATION.cff file

Clearing the handlers after setup_logging left propagate False, so records never
reached the application's handlers again: INFO was dropped and warnings fell back to
logging.lastResort.
@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.08%. Comparing base (7dd1f20) to head (8fa7685).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #219   +/-   ##
=======================================
  Coverage   98.08%   98.08%           
=======================================
  Files           8        8           
  Lines         890      890           
=======================================
  Hits          873      873           
  Misses         17       17           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sappelhoff
sappelhoff merged commit ae4cbc4 into main Nov 3, 2026
10 checks passed
@sappelhoff
sappelhoff deleted the doc-logging-hand-back branch November 3, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant